﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace NetFWMvcTest.Controllers
{
    public class TestController : Controller
    {
        // GET: Test
        public ActionResult Index()
        {
            return View();
        }
        public string TestParam(string username, string password, string eid, string token)
        {
            var json = JsonConvert.SerializeObject(new { username, password, eid, token });
            return json;
        }
        public string TestForm(TestModel testModel, string username, string password,string eid, string token)
        {
            return JsonConvert.SerializeObject(testModel);
        }
    }
    public class TestModel
    {
        public string username { get; set; }
        public string password { get; set; }
        public string eid { get; set; }
        public string token { get; set; }
    }
}